package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2018/12/19 19:34
 * @description
 */
public class Code867 {
    public int[][] transpose(int[][] A) {
        if (A == null) {
            return new int[][] {{}};
        }
        int[][] result = new int[A[0].length][A.length];
        for (int i = 0; i < A.length; i++) {
            for (int i1 = 0; i1 < A[0].length; i1++) {
                result[i1][i] = A[i][i1];
            }
        }
        return result;
    }
}
